<!DOCTYPE html>
<html>
	<head>
		<script type="text/javascript" src="src/gaf.js"></script>
		<script type="text/javascript" src="src/observable.js"></script>
		<script type="text/javascript" src="src/services/gameloop.js"></script>
		<script type="text/javascript">
			var f = function(event) {
				console.log(event.target.actualFPS)
			}
			
			var gl = new gaf.services.GameLoop(null, 60);
			gl.subscribe('onUpdate', f);
			
			gl.start();
			//gl.stop();
			
			//gl.unsubscribe('onUpdate', f);
			
			setTimeout(function() {
				gl.stop();
				gl.unsubscribe('onUpdate', f);
			}, 2000);
		</script>
	</head>
</html>